import axios from './http'
import qs from 'qs'
import base from './base'
const detail = {
  info (params) {
    return axios.get(`${base.pro}/api/goods/goodsDetail`, {
      params
    })
  },
  collect (params) {
    return axios.get(`${base.pro}/api/goods/collections`, {
      params
    })
  },
  add (params) {
    return axios.post(`${base.pro}/api/cart/add`, qs.stringify(params))
  },
  createdOrder (params) {
    return axios.post(`${base.pro}/api/order/createOrder`, qs.stringify(params))
  }
}

export default detail
